package com.ld.security.server.admin.modules.ge.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.ld.security.common.core.base.column.ListJson;
import com.ld.security.common.core.base.column.MapJson;
import com.ld.security.common.mybatis.anno.LabelKey;
import com.ld.security.common.mybatis.anno.LabelKeys;
import com.ld.security.common.mybatis.anno.SqlKey;
import com.ld.security.common.mybatis.base.entity.LabelMap;
import com.ld.security.common.mybatis.base.entity.SuperEntity;
import com.ld.security.common.mybatis.constant.SqlCondition;
import com.ld.security.common.mybatis.core.entity.SqlUserEntity;
import com.ld.security.server.admin.modules.ge.sql.SqlProjectPo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

@TableName("ge_view")
@ApiModel("视图")
@Data
public class GeViewEntity extends GeScopeEntity implements LabelMap
{

    @LabelKeys(GePackEntity.class)
    @SqlKey(SqlCondition.eq)
    @ApiModelProperty("模块编号")
    private String packId;




    @LabelKeys(value = GeViewTelEntity.class,
            labels = {
                    @LabelKey(sourceKey = "label",targetKey = ""),
                    @LabelKey(sourceKey = "code",targetKey = "code"),
                    @LabelKey(sourceKey = "preview",targetKey = "preview"),

            })
    @SqlKey(SqlCondition.eq)
    @ApiModelProperty("抽象视图")
    private String viewTelId;

    @SqlKey(SqlCondition.like)
    @ApiModelProperty("标题")
    private String label;

    @SqlKey(SqlCondition.like)
    @ApiModelProperty("文件名")
    private String fileName;


   @SqlKey(SqlCondition.eq)
    private String code;

    @SqlKey(SqlCondition.eq)
    @ApiModelProperty("数据源编号")
    private String dataSourceId;

    @SqlKey(SqlCondition.anon)

    @ApiModelProperty("变量")
    private ListJson viewArgs;


    @SqlKey(SqlCondition.anon)
    private MapJson labelMap;



    @SqlKey(SqlCondition.eq)
    @ApiModelProperty("可预览")
    private Boolean preview;




}
